enhance: bump token keyspace to >128 bits#939
Merged
eternal-flame-AD merged 1 commit intomasterfrom Mar 29, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #939 +/- ##
=======================================
Coverage 78.70% 78.70%
=======================================
Files 57 57
Lines 2517 2517
=======================================
Hits 1981 1981
Misses 397 397
Partials 139 139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous keyspace: 2^84.3131 (2.40e25) , we are moving to 2^132.5 keyspace (7.65e+39)
Closes #936
The original length is indeed on the legacy end of the spectrum and slightly behind OWASP recommendations for a password without MFA , therefore I think it's good to bump it to >128 bits to push it well into cryptographic secret strength that TLS/SSH accepts and collision resistance on SHA256 is targeted at. Maybe this can also simplify some workflows if some users want's to built ad hoc E2EE systems.
Regardng the proposal in #936 I don't see the need to add a token length option because the "ceiling" of security (TLS) is clear and achievable by simply bumping the constant. Creating a knob can lead to downstream problems like tokens too long causing them to not fit in certain webhook forms, etc.
The increase in character count is modest, so I don't expect any issues with URL or webhook form length not fitting, but after the increase we can confidently say at least regarding the brute force attack vector TLS would be the weakest link by every metric.